package com.zxwl.common.log;

import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;

public class LoggerManager
{

	public LoggerManager()
	{
	}

	@SuppressWarnings("unchecked")
	public static ILogger getLogger(Object obj)
	{
		String className = obj.getClass().getName();
		if (!loggers.containsKey(className))
		{
			ILogger logger = new LogWriter(Logger.getLogger(obj.getClass()));
			loggers.put(className, logger);
			return logger;
		}
		else
		{
			return (ILogger) loggers.get(className);
		}
	}

	@SuppressWarnings("rawtypes")
	static Map loggers = new HashMap();

}
